﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfTravelFoodInfo.aspx.cs" Inherits="msBsc.WebUi.wMall.Public.wfTravelFoodInfo" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>美食</title>
    <link href="/jqPlugin/SelectSimu/css/base.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/sLayout.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/Public/sTraveInfo.css" rel="stylesheet" />
</head>
<body>
    <%=msBsc.WebUi.Code.QtHtmlGet.GetHeaderLoginInfo() %>
    <div class="viewContent">
        <input type="hidden" id="foodId" />
        <div class="nav">
            <a id="topArea">北京</a><span>></span><a id="secendAreaId">北京</a><span>></span><a id="areaId">东城</a><span>></span><a id="foodList">美食</a>
        </div>
        <div class="travelInfo" id="contentInfo">
        </div>
        <%--<div class="pageChange">
            <span id="previousName">上一条：</span><a id="previous"></a>

            <span id="nextName">下一条：</span><a id="next"></a>
        </div>--%>
    </div>
    <%=msBsc.WebUi.Code.QtHtmlGet.GetFloorHtml() %>
    <!--start JS引用-->
    <script src="/jqPlugin/js/jquery-1.8.3.min.js"></script>
    <script src="/jqPlugin/js/jBase.js"></script>
    <script src="/jqPlugin/js/jBPage.js"></script>
    <script src="/jqPlugin/js/laytpl.js"></script>
    <script src="/jqPlugin/SelectSimu/js/SelectSimu.js"></script>
    <script src="/themes/wStyle1/js/comm/VerifyJs.js"></script>
    <script src="/themes/wStyle1/js/comm/jsLayout.js"></script>
    <script type="text/ecmascript">
        (function () {
            $("#foodId").val(GetQueryStr("foodId"));
        })()
        function btnDo(sEbtn) {
            GtGrid1Action = sEbtn;
            var opart = GetGtParam();
            opart = addNoAreStatistics(opart, "资讯美食详情", "w0009");
            ajaxComm(opart);
        };
        //执行AJAX调用时获取参数
        function GetGtParam() {
            var _jsParam = new jsonRow();
            _jsParam.AddCell("foodId", $("#foodId").val());
            _jsParam.AddCell("ACTION", GtGrid1Action);
            return _jsParam;
        };
        btnDo("init");

        function setScenicInfo(data) {
            $("#contentInfo").html("");
            if (IsNull(data)) {
                return;
            }
            document.title += "-" + data.rows[0].NAME;
            $("#topArea").text(data.rows[0].COUNTRYNAME);
            $("#topArea").attr("data-value", data.rows[0].COUNTRYID);
            $("#secendAreaId").text(data.rows[0].CITYNAME);
            $("#secendAreaId").attr("data-value", data.rows[0].CITYID);
            $("#areaId").text(data.rows[0].DESTINATIONNAME);
            $("#areaId").attr("data-value", data.rows[0].DISTIANTIONID);
            //$("#menuName").text(data.rows[0].NAME);
            $("#foodList").text(data.rows[0].NAME);
            //$("#contentInfo").html(data.rows[0].DETAILS);
            doBoundContent(data.rows[0].CONTENT_FILE_URL);
            //$("#foodList").attr("href", "/wp_TraveFoodList.htm?countryId=" + data.rows[0].COUNTRYID + "&cityId=" + data.rows[0].CITYID + "&destionId=" + data.rows[0].DISTIANTIONID + "&pIndex=1");
            $("#areaId").attr("href", "/wp_TraveFoodList.htm?countryId=" + data.rows[0].COUNTRYID + "&cityId=" + data.rows[0].CITYID + "&destionId=" + data.rows[0].DISTIANTIONID + "&pIndex=1");
            $("#secendAreaId").attr("href", "/wp_TraveFoodList.htm?countryId=" + data.rows[0].COUNTRYID + "&cityId=" + data.rows[0].CITYID + "&destionId=&pIndex=1");
            $("#topArea").attr("href", "/wp_TraveFoodList.htm?countryId=" + data.rows[0].COUNTRYID + "&cityId=&destionId=&pIndex=1");
            //if (IsNull(data.rows[0].PREVIEWNAME)) {
            //    $("#previousName").hide();
            //    $("#previous").text("");
            //    $("#previous").attr("href", "/wp_TravelFoodInfo.htm?foodId=" + data.rows[0].PREVIEWID);
            //} else {
            //    $("#previousName").show();
            //    $("#previous").text(data.rows[0].PREVIEWNAME);
            //    $("#previous").attr("href", "/wp_TravelFoodInfo.htm?foodId=" + data.rows[0].PREVIEWID);
            //}
            //if (IsNull(data.rows[0].NEXTNAME)) {
            //    $("#nextName").hide();
            //    $("#next").text("");
            //    $("#next").attr("href", "/wp_TravelFoodInfo.htm?foodId=" + data.rows[0].NEXTID);
            //} else {
            //    $("#nextName").show();
            //    $("#next").text(data.rows[0].NEXTNAME);
            //    $("#next").attr("href", "/wp_TravelFoodInfo.htm?foodId=" + data.rows[0].NEXTID);
            //}
        }
        function doBoundContent(_shopurl) {
            if (_shopurl != null && _shopurl != undefined && _shopurl != '') {
                jQuery.loadHtml(_shopurl).done(function (_rethtml) {
                    var tpl = HtmlUtil.htmlDecode(_rethtml);
                    $("#contentInfo").html(tpl);
                });
            }
        };
    </script>
</body>
</html>
